﻿<%@ Page Language="C#" MasterPageFile="~/Provider/CarInsurance/Liberty_CarInsurance.master"
    AutoEventWireup="true" CodeFile="ProviderCarDiscount.aspx.cs" Inherits="provider_CarInsurance_ProviderCarDiscount" %>

<%@ Register Src="~/controls/usrDate.ascx" TagName="usrDate" TagPrefix="uc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script src="~/controls/CE_Date.js" type="text/javascript"></script>

    <div class="provider_inner">
        <h1>
            Car Discounts</h1>
        <fieldset>
            <legend></legend>
            <dl>
                <dt>
                    <label>
                        Discount</label></dt>
                <dd>
                    <asp:DropDownList ID="ddlDiscount" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlDiscount_SelectedIndexChanged">
                        <asp:ListItem Value="-1">Select</asp:ListItem>
                         <asp:ListItem Value="Additionalnamed">Addtnal Named</asp:ListItem>                         
                        <asp:ListItem Value="Carrent">Car Rental Extension</asp:ListItem>
                        <asp:ListItem Value="Dealers">Dealer's W/Shop Extension</asp:ListItem>                        
                        <asp:ListItem Value="Loyalty">Loyalty</asp:ListItem>                        
                        <asp:ListItem Value="Moonroof">MoonRoof Extension</asp:ListItem>                        
                        <asp:ListItem Value="Multicars">Multi-Cars</asp:ListItem>                        
                        <asp:ListItem Value="NCBP">NCBP Premium Loading</asp:ListItem>
                        <asp:ListItem Value="Offencefree">Offence Free</asp:ListItem>
                        <asp:ListItem Value="Offpeak">OffPeak/Weekend</asp:ListItem>
                        <asp:ListItem Value="Restricted">Restricted Dr Condition</asp:ListItem>                        
                        <asp:ListItem Value="Sunroof">SunRoof Extension</asp:ListItem>
                        <asp:ListItem Value="Voluntary">Voluntary Excess</asp:ListItem>                        
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvDiscount" runat="server" ControlToValidate="ddlDiscount"
                        ErrorMessage="Select discount." Display="Dynamic" ValidationGroup="cardiscount"
                        InitialValue="-1"></asp:RequiredFieldValidator>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Type</label></dt>
                <dd>
                    <asp:DropDownList ID="ddlDiscountType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlDiscount_SelectedIndexChanged">
                        <asp:ListItem Value="-1">Select</asp:ListItem>
                        <asp:ListItem Value="Non">Non Plus</asp:ListItem>
                        <asp:ListItem Value="Plus">Plus</asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvDiscountType" runat="server" ControlToValidate="ddlDiscountType"
                        ErrorMessage="Select discount type." Display="Dynamic" ValidationGroup="cardiscount"
                        InitialValue="-1"></asp:RequiredFieldValidator>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Description</label></dt>
                <dd>
                    <asp:DropDownList ID="ddlDescription" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlDiscount_SelectedIndexChanged">
                        <asp:ListItem Value="-1">Select</asp:ListItem>
                        <asp:ListItem Value="A">Applicable</asp:ListItem>
                        <asp:ListItem Value="NA">Not Applicable</asp:ListItem>
                        <asp:ListItem Value="2nd">2nd Car Disc (5%)</asp:ListItem>
                        <asp:ListItem Value="3rd">3rd Car & Above Disc (10%)</asp:ListItem>
                        <asp:ListItem Value="500">S$500 Excess</asp:ListItem>
                        <asp:ListItem Value="1000">S$1000 Excess</asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvDescription" runat="server" ControlToValidate="ddlDescription"
                        ErrorMessage="Select description." Display="Dynamic" ValidationGroup="cardiscount"
                        InitialValue="-1"></asp:RequiredFieldValidator>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Rate</label></dt>
                <dd>
                    <asp:TextBox ID="txtRate" runat="server" MaxLength="6"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvRare" runat="server" ControlToValidate="txtRate"
                        ErrorMessage="Enter rate." Display="Dynamic" ValidationGroup="cardiscount"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revPoint" runat="server" ControlToValidate="txtRate"
                        ErrorMessage="Rate is not valid." ValidationGroup="cardiscount" ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Schedule Rate Update</label></dt>
                <dd>
                    <asp:RadioButtonList runat="server" ID="rdoEffectivity" RepeatDirection="Horizontal"
                        AutoPostBack="true" OnSelectedIndexChanged="EffectiveWhen">
                        <asp:ListItem Value="Yes">Yes</asp:ListItem>
                        <asp:ListItem Value="No">No</asp:ListItem>
                    </asp:RadioButtonList>
                </dd>
            </dl>
            <div id="divNewRate" runat="server" visible="false">
                <dl>
                    <dt>
                        <label>
                            Effectivity Date</label></dt>
                    <dd>
                        <uc1:usrDate ID="usrEffectivityDate" ValidationGroup="cardiscount" runat="server"
                            IsNotLessThanToday="true" />
                    </dd>
                </dl>
                <dl>
                    <dt>
                        <label>
                            New Point</label></dt>
                    <dd>
                        <asp:TextBox ID="txtNewRate" runat="server" MaxLength="5"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvNewRate" runat="server" ControlToValidate="txtNewRate"
                            ErrorMessage="Enter new rate." Display="Dynamic" ValidationGroup="cardiscount"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="revNewRate" runat="server" ControlToValidate="txtNewRate"
                            ErrorMessage="Rate is not valid." ValidationGroup="cardiscount" ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                    </dd>
                </dl>
            </div>
            <dl>
                <dt>
                    <label>
                        Auth Code</label></dt>
                <dd>
                    <asp:TextBox ID="txtAuthCode" runat="server" TextMode="Password" MaxLength="12" Width="150px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvAuthCode" runat="server" ControlToValidate="txtAuthCode"
                        ErrorMessage="Enter auth code." ValidationGroup="cardiscount"></asp:RequiredFieldValidator>
                </dd>
            </dl>
        </fieldset>
        <fieldset class="action">
            <asp:ImageButton OnClientClick="javascript:return confirm('Are you sure to go back?');"
                ID="ibtBack" runat="server" CssClass="left_btn" ImageUrl="~/Provider/images/buttons/back1.gif"
                OnClick="ibtBack_Click" />
            <asp:ImageButton ID="ibtSubmit" runat="server" CssClass="float_btn" ImageUrl="~/Provider/images/buttons/submit1.gif"
                OnClick="ibtSubmit_Click" ValidationGroup="cardiscount" />
        </fieldset>
        <asp:Label ID="lblMessage" runat="server" CssClass="successmsg"></asp:Label>
    </div>
</asp:Content>
